package top.kuxiao.crmserver.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 客户流失管理
 * </p>
 *
 * @author xiaozhang
 * @since 2022-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CustomerLoss implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 流失id
     */
    @TableId(value = "customer_loss_id", type = IdType.AUTO)
    private Integer customerLossId;

    /**
     * 外键（客户编号）
     */
    private Integer customerId;
    /**
     * 客户编号
     * */
    @TableField(exist = false)
    private Customer customer;

    /**
     * 外键（客户经理）
     */
    private Integer accountManagerId;
    /**
     * 客户经理
     * */
    @TableField(exist = false)
    private AccountManager accountManager;

    /**
     * 上次下单时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd HH:mm:ss")
    private Date lastOrderTime;

    /**
     * 暂缓流失措施
     */
    private String suspensionOfLossMeasures;

    /**
     * 确认流失原因
     */
    private String confirmLossReason;

    /**
     * 确认流失时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(fallbackPatterns = "yyyy-MM-dd HH:mm:ss")
    private Date confirmLossTime;

    /**
     * 客户流失状态
     */
    private String customerLossState;


}
